FROM daocloud.io/java:8-jre-alpine
MAINTAINER wolferhua

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
RUN apk update && apk add redis
RUN mkdir /cluster
COPY redis-cluster-manager-jar-with-dependencies.jar /cluster
COPY conf.properties /cluster
COPY cluster /usr/local/bin/

RUN chmod +x /usr/local/bin/cluster

ENTRYPOINT ["cluster"]

#CMD "java -jar /cluster/redis-cluster-manager-jar-with-dependencies.jar"
# docker build -t wolferhua/redis:clu-java .